<template>
	<view class="">
		<view class="dots">
			<swiper class="img-swipe" :autoplay="false" :circular="true" :indicator-dots="false" :interval="3000" :current="current"
			 @change="swiperChange">
				<swiper-item v-for="(item,index) in lists" :key="index">
					<image class="ad-imgs" :src="item.img" mode=""></image>
				</swiper-item>
			</swiper>
			<!-- //指示点 -->
			<view class="dots-container">
				<view v-for="(item,index) in lists" :key="index">
					<view :class="['dot', index === swiperCurrent ? 'active' : '']"></view>
				</view>
			</view>
		</view>
		<view class="grild">
			<view>
				<view class='pic_Hair'>
					<image src="/static/fuwu/356.png" mode=""></image>
				</view>
				<view class="text">365专区</view>

			</view>
			<view>
				<view class='pic_Hair'>
					<image src="/static/fuwu/vip.png" mode=""></image>
				</view>
				<view class="text">vip会员</view>

			</view>
			<view>
				<view class='pic_Hair'>
					<image src="/static/fuwu/xp.jpg" mode=""></image>
				</view>
				<view class="text">新品优选</view>

			</view>
			<view>
				<view class='pic_Hair'>
					<image src="/static/fuwu/by.png" mode=""></image>
				</view>
				<view class="text">免费包邮</view>

			</view>
		</view>
		<view class="notice">
			<view class="notice-txt">官方公告/图片广告链接</view>
		</view>
		<view class="members">
			<view class="shu"></view>
			<view class="member-name">会员优选</view>
		</view>
		<view class="member-cen">
			<view class="mem-center" v-for="(item,index) in member" :key="index">
				<view class="mem-cen-top">
					<image :src="item.img" mode=""></image>
					<view class="inst">{{item.name}}</view>
					<view class="ems">
						<text> {{item.txt1}} </text>|
						<text> {{item.txt2}} </text>|
						<text> {{item.txt3}} </text>|
						<text> {{item.txt4}} </text>
					</view>
				</view>
				<view class="mem-con">
					<view class="con" v-for="(ite,inde) in item.memberList" :key="index">
						<view class="con-img">
							<image :src="ite.pic" mode=""></image>
						</view>
						<view class="con-text">
							<view class="name1">{{ite.name1}}</view>
							<view class="con-price">￥{{ite.price}}</view>
							<view class="original ">原价：￥{{ite.original}}元</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				lists: [{
						img: '/static/nan.jpg',
					},
					{
						img: '/static/nan.jpg',
					}
				],
				member: [{
						img: '/static/fuwu/mr.png',
						name: "美容.仪器INSTRUNENT",
						txt1: '声波',
						txt2: '光疗',
						txt3: '射频',
						txt4: 'EMS',
						memberList: [{
								pic: '/static/timg.jpg',
								name1: '欧莱雅植物洗发水',
								price: '365.00',
								original: '600.00'
							},
							{
								pic: '/static/timg.jpg',
								name1: '欧莱雅植物洗发水',
								price: '365.00',
								original: '600.00'
							},
							{
								pic: '/static/timg.jpg',
								name1: '欧莱雅植物洗发水',
								price: '365.00',
								original: '600.00'
							}, {
								pic: '/static/timg.jpg',
								name1: '欧莱雅植物洗发水',
								price: '365.00',
								original: '600.00'
							}
						],

					},
					{
						img: '/static/fuwu/hf.png',
						name: "美容.护肤INSTRUNENT",
						txt1: '声波',
						txt2: '光疗',
						txt3: '射频',
						txt4: 'EMS',
						memberList: [{
								pic: '/static/timg.jpg',
								name1: '欧莱雅植物洗发水',
								price: '365.00',
								original: '600.00'
							},
							{
								pic: '/static/timg.jpg',
								name1: '欧莱雅植物洗发水',
								price: '365.00',
								original: '600.00'
							},
							{
								pic: '/static/timg.jpg',
								name1: '欧莱雅植物洗发水',
								price: '365.00',
								original: '600.00'
							}, {
								pic: '/static/timg.jpg',
								name1: '欧莱雅植物洗发水',
								price: '365.00',
								original: '600.00'
							}
						],

					}
				],

				current: 0,
				swiperCurrent: 0
			}

		},
		methods: {
			swiperChange(e) {
				this.swiperCurrent = e.detail.current
			}
		}
	}
</script>

<style lang="scss">
	.dots {
		width: 100%;
		height: 425rpx;
		position: relative;

		.img-swipe {
			width: 100%;
			height: 370rpx;

			.ad-imgs {
				width: 100%;
				height: 100%;

			}
		}

		.dots-container {
			position: absolute;
			left: 0;
			right: 0;
			bottom: 10rpx;
			display: flex;
			justify-content: center;

			.dot {
				margin: 0 8rpx;
				width: 12rpx;
				height: 12rpx;
				background: #b2b2b2;
				border-radius: 8rpx;
			}

			.dot.active {
				background: #4e4e4e;
			}
		}
	}


	.grild {
		padding: 40rpx 20rpx;
		border-bottom: 3rpx solid #cccccc;
		box-shadow: 0px 12rpx 8px -12rpx #eee;
		display: flex;
		justify-content: space-between;
		align-items: center;

		view {
			// width: ;
			text-align: center;
			flex: 1;
			margin: 0 auto;

			.pic_Hair {
				width: 45rpx;
				height: 45rpx;

				image {
					width: 100%;
					height: 100%;
				}
			}

			.text {
				text-align: center;
				font-size: 26rpx;
				font-family: PingFang;
				font-weight: 500;
				color: #333333;
				line-height: 25rpx;
				padding-top: 25rpx;
			}
		}


	}

	.notice {
		padding: 35rpx 35rpx 0 35rpx;

		.notice-txt {
			padding: 60rpx 40rpx;
			background-color: #eee;
			font-size: 23rpx;
			color: #000000;
		}
	}

	.members {
		padding: 67rpx 0 33rpx 35rpx;
		border-bottom: 4rpx solid #cccccc;
		box-shadow: 0px 12rpx 8px -12rpx #eee;
		display: flex;
		align-items: center;

		.shu {
			width: 10rpx;
			height: 45rpx;
			background-color: #00c6c2;
			margin-right: 20rpx;
		}

		.members-name {
			font-size: 44rpx;
			color: #000000;
			font-weight: bold;

		}
	}

	.member-cen {
		padding: 25rpx;

		.mem-center {
			border-bottom: 4rpx solid #CCCCCC;

			.mem-cen-top {
				width: 100%;
				margin: auto;
				text-align: center;
				padding: 35rpx 0;

				image {
					width: 56rpx;
					height: 72rpx;
				}

				.inst {
					font-size: 34rpx;
					font-family: PingFang;
					font-weight: 500;
					color: #000;
					margin-top: 40rpx;
				}

				.ems {
					font-size: 24rpx;
					font-family: PingFang;
					font-weight: 400;
					color: #000;
					margin: 33rpx 0 27rpx 0;
					
					text{
						letter-spacing:8rpx
					}
				}
			}

			.mem-con {
				width: 100%;
				display: flex;
				flex-wrap: wrap;
				justify-content: space-between;

				.con {
					// width: 45%;

					.con-img {
						width: 340rpx;
						height: 340rpx;

						image {
							width: 100%;
							height: 100%;
						}

					}

					.con-text {
						width: 100%;
						text-align: center;
						padding: 22rpx 0 30rpx 0;

						.name1 {
							font-size: 24rpx;
							color: #000000;
							font-weight: 500;
							font-family: PingFang;

						}

						.con-price {
							font-size: 22rpx;
							color: #333;
							font-family: PingFang;
							margin: 15rpx 0;
						}

						.original {
							margin: auto;
							width: 125rpx;
							height: 25rpx;
							line-height: 25rpx;
							text-align: center;
							background-color: #CCCCCC;
							font-size: 14rpx;
							color: #303133;
						}
					}
				}
			}
		}
	}
</style>
